package com.yonyou.brigade.order_center.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yonyou.brigade.order_center.model.BriOrderListVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface IBriOrderService {
    Map getMenuOptions(Map params);

    void saveHotel(JSONObject orderJson, String orderNo, String tenant, String personCodeOrPhone, String fromType, int channelId) throws ParseException;

    void saveFlight(JSONObject orderJson, String orderNo, String tenant, String personCodeOrPhone, String fromType, int channelId) throws ParseException;

    void saveTrain(JSONObject orderJson, String orderNo, String tenant, String orderUserOutStaffNo, String fromType, int channelId);

    void saveCar(JSONObject orderJson, String orderId, String tenant, String personCodeOrPhone, String fromType, int channelId);

    List<BriOrderListVO> getBriOrderList(Map<String, Object> params);

    void updateSQByRelateYbzIds(JSONArray relateYBZIds, String tenantId);

    Map getPersonalMenuOptions(Map params);

    JSONObject getOrdersByApplyIds(String tenantId, JSONObject params);

    JSONObject getOrdersByTimeRange(String tenantId, JSONObject params);

    JSONObject importOrderList(String tenantId, String type, MultipartFile file) throws IOException;

    JSONObject getBriOrderDetail(JSONObject params);

    /**
     * 获取订单详情
     * @param tenant 租户
     * @param orderNo   订单编号
     * @param type  订单类型：机票，火车，酒店等
     * @return
     */
    JSONObject getBriOrderDetail(String tenant, String orderNo, String type);

    List<BriOrderListVO> getOrdersByOrderNoAndClass(JSONArray params);

    /**
     * 获取订单信息（包含订单信息，订单详情等信息）
     * @param userId 用户ID
     * @param bxState 报销状态
     * @param beginDate 开始时间
     * @param endDate   结束时间
     * @param type  订单类型，不填则查出全部类型
     * @return
     */
    JSONObject getOrders(String userId, String bxState, String beginDate, String endDate, String type, String tenantId);

    JSONArray getOrders(String tenant, String type, String orderNo);

    

}
